{literal}
<script type="text/javascript">

function _checkAddForm()
{
	var sFormName = document.getElementById('form_menu').value;

	if ( sFormName == "1" )
	{
		document.getElementById('in_menu').style.display='';
		document.getElementById('in_menu2').style.display='';
	}
	else
	{
		document.getElementById('in_menu').style.display='none';
		document.getElementById('in_menu2').style.display='none';
	}

	return true;
}

</script>
{/literal}
{if $aError}
<ul>
{foreach from=$aError item=aError}
	<li>{$aError}</li>
{/foreach}
</ul>
{/if}
{if $iNewPageId}
<div style="padding:10px;font-size:10pt;">
{language text="Mod_Site.page_created"}: <a href="{url link="public.`$iNewPageId`"}">{url link="public.`$iNewPageId`"}</a>
</div>
{/if}
{if $bIsPageEdit}
<div style="padding:10px;font-size:10pt;">
{language text="Mod_Site.page_updated"}: <a href="{url link="public.`$bIsPageEdit`"}">{url link="public.`$bIsPageEdit`"}</a>
</div>
{/if}
<form method="post" action="{url link="admin.main.pages" action="create"}{if $aEdit.page_id}id_{$aEdit.page_id}/{/if}">
{if $aEdit}
<div><input type="hidden" name="var[edit_id]" value="{$aEdit.page_id}" /></div>
<div><input type="hidden" name="var[old_url]" value="{$aEdit.title_url}" /></div>
{if $aEdit.menu}
<div><input type="hidden" name="var[menu_id]" value="{$aEdit.menu}" /></div>
{/if}
{/if}
<table style="width:100%;" cellspacing="0" cellpadding="0">
<tr>
	<td style="font-size:10pt;text-align:right;" class="row1">{language text="Mod_Site.page_title"}:</td>
	<td class="row1"><input type="text" name="var[title_head]" value="{$aEdit.title_head}" size="30" maxlength="50" /></td>
</tr>
<tr>
	<td style="font-size:10pt;text-align:right;" class="row1">{language text="Mod_Site.url_title"}:</td>
	<td class="row1">
		<input type="text" name="var[title_url]" value="{$aEdit.title_url}" size="30" maxlength="75" />
		<div style="padding:3px;">
			({language text='Mod_Site.page_will_become'} {url link='public.page-name'})
		</div>
	</td>
</tr>
<tr>
	<td style="font-size:10pt;text-align:right;" class="row1">{language text="Mod_Site.meta_keywords"}:</td>
	<td class="row1"><input type="text" name="var[meta]" value="{$aEdit.meta}" size="30" maxlength="150" /></td>
</tr>
<tr>
	<td style="font-size:10pt;text-align:right;" class="row1">{language text="Mod_Site.add_to_menu"}:</td>
	<td class="row1">
	<select name="var[menu]" id="form_menu" onchange="javascript:_checkAddForm();">
		<option value=""{if !$aEdit.menu} selected="true"{/if}>{language text="Mod_Site.no"}</option>
		<option value="1"{if $aEdit.menu} selected="true"{/if}>{language text="Mod_Site.yes"}</option>
	</select>
	</td>
</tr>
<tr id="in_menu"{if !$aEdit.menu} style="display:none;"{/if}>
	<td style="font-size:10pt;text-align:right;" class="row1">{language text="Mod_Site.menu_title"}:</td>
	<td class="row1"><input type="text" name="var[title_menu]" value="{$aEdit.title_menu}" size="30" maxlength="25" /></td>
</tr>
<tr id="in_menu2"{if !$aEdit.menu} style="display:none;"{/if}>
	<td style="font-size:10pt;text-align:right;" class="row1">{language text="Mod_Site.menu_location"}:</td>
	<td class="row1">
	<select name="var[location]">
		<option value="0"{if $aEdit.location == "0"} selected="true"{/if}>{language text="Mod_Site.main"}</option>
		<option value="1"{if $aEdit.location == "1"} selected="true"{/if}>{language text="Mod_Site.header"}</option>
		<option value="2"{if $aEdit.location == "2"} selected="true"{/if}>{language text="Mod_Site.footer"}</option>
	</select>
	</td>
</tr>
<tr>
	<td style="font-size:10pt;text-align:right;vertical-align:top;" class="row1">{language text="Mod_Site.content"}:</td>
	<td class="row1">
	<textarea cols="60" rows="15" name="var[content]" id="maintext">{$aEdit.content|escape}</textarea>
	</td>
</tr>
<tr>
	<td style="font-size:10pt;text-align:right;" class="row1"></td>
	<td class="row1">
	<div style="float:left;">
		<input type="submit" value="{language text='submit'}" />
	</div>
	<div style="text-align:right;">
		{if $bUseTinyMCE}
		[ <a href="{url link="admin.main.pages" action="create"}{if $aEdit.page_id}id_{$aEdit.page_id}/{/if}">{language text="Mod_Site.turn_off_editor"}</a> ]
		{else}
		[ <a href="{url link="admin.main.pages" action="create"}{if $aEdit.page_id}id_{$aEdit.page_id}/{/if}wysiwyg_true/">{language text="Mod_Site.turn_on_editor"}</a> ]
		{/if}
	</div>
	</td>
</tr>
</table>
</form>